//
//  UIView+YZBadge.h
//  RedDotTest
//
//  Created by lixiaoyi on 2018/7/18.
//  Copyright © 2018年 lixiaoyi. All rights reserved.
//

#import <UIKit/UIKit.h>

@class BadgeBuilder;

typedef void(^BudgeBuilderBlock)(BadgeBuilder *builder);

@interface BadgeBuilder:NSObject

/**
 角标为图片
 */
@property (nonatomic, strong) UIImage *image;

/**
 角标为文字
 */
@property (nonatomic, strong) NSNumber *number;

/**
 角标背景色
 */
@property (nonatomic, strong) UIColor *backgroundColor;

/**
 文字字体
 */
@property (nonatomic, strong) UIFont *font;

/**
 文字颜色
 */
@property (nonatomic, strong) UIColor *textColor;

/**
 大小：默认9*9
 */
@property (nonatomic) CGSize size;

/**
 在当前位置的偏移量
 */
@property (nonatomic) CGPoint offset;

@end



@interface UITabBar (YZBadge)

- (UIView *)viewInTabbarAtIndex:(NSInteger)index;

@end

@interface UIView (YZBadge)

- (void)setBadge:(BudgeBuilderBlock)builderHandler;

@end
